const mysql=require('mysql')
const pool=mysql.createPool({
    connectionLimit:10,
    host:'localhost',
    user:'bobi',
    password:'123',
    database:'table1'
})
//操作数据库
pool.query('sql语句',function(error,results,fields){
    if(error) throw error
    console.log(results);
})